<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core" >

    <!-- INTERFACE -->
    <cc:interface>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>  

        <div id="menu" >
                <nav id="topNav">
                <ul>
                    <ui:repeat value="#{menuCatBean.categorias}" var="cat" >
                        <li>
                            <h:link value="#{cat.nombre}" outcome="/vistas/verCategoria" >
                                <f:param name="id" value="#{cat.id}" />
                            </h:link>
                            <ul>
                                <ui:repeat value="#{cat.subcategorias}" var="subcat" >
                                    <li>
                                        <h:link value="#{subcat.nombre}"
                                                       outcome="/vistas/verCategoria">
                                            <f:param name="id" value="#{subcat.id}" />
                                        </h:link>
                                    </li>
                                </ui:repeat>
                            </ul>
                        </li>
                    </ui:repeat>
                </ul>
                </nav>
        </div>


    </cc:implementation>
</html>